package com.changgou.goods.dao;

import com.changgou.goods.pojo.Sku;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

public interface SkuMapper extends Mapper<Sku> {

    @Select("select count(*) from tb_category_brand where category_id = #{category3Id} and brand_id = #{brandId}")
    int findByCategoryIdAndBrandId(@Param("category3Id") Integer category3Id, @Param("brandId") Integer brandId);

    @Insert("insert into tb_category_brand values (#{category3Id} ,#{brandId})")
    void insertCategoryAndBrand(@Param("category3Id") Integer category3Id, @Param("brandId") Integer brandId);
}
